//
//  BasicTableViewCell.m
//  HappinessTrip
//
//  Created by dllo on 15/10/14.
//  Copyright © 2015年 蓝鸥科技. All rights reserved.
//

#import "BasicTableViewCell.h"
#import "Fit.h"

@implementation BasicTableViewCell

-(void)dealloc
{
    [_pictureImageView release];
    [_blackImageView release];
    [super dealloc];
}
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createViews];
    }
    return self;
}
-(void)createViews
{
    _pictureImageView = [[UIImageView alloc]init];
    [self.contentView addSubview:_pictureImageView];
    [_pictureImageView release];
    _blackImageView = [[UIImageView alloc]init];
    [_pictureImageView addSubview:_blackImageView];
    [_blackImageView release];

}
-(void)layoutSubviews
{
    [super layoutSubviews];
    _pictureImageView.frame = CGRectMake(20 * W, 20 * H, self.contentView.frame.size.width - 40 * W, self.contentView.frame.size.height - 20 * H);
    _pictureImageView.layer.cornerRadius = 5;
    _pictureImageView.layer.masksToBounds = YES;
    _blackImageView.frame = CGRectMake(0, 0, _pictureImageView.frame.size.width, _pictureImageView.frame.size.height);
    _blackImageView.backgroundColor = [UIColor blackColor];
    _blackImageView.alpha = .2;
    _blackImageView.layer.cornerRadius = 5;
    _blackImageView.layer.masksToBounds = YES;

}










- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
